package version2;

import java.awt.Color;

import javax.media.j3d.Appearance;
import javax.media.j3d.Material;
import javax.vecmath.Color3f;
import javax.vecmath.Vector3f;

public class Vesicle 
{
	float x;
	float y;
	float radius;
	int slice;
	Appearance app;
	Vector3f location;
	Color3f black = new Color3f(Color.BLACK);
	Color3f color;
	
	public void changeColor(int index)
	{
		//app = new Appearance();
		app.setCapability(Appearance.ALLOW_MATERIAL_WRITE);
		
		switch (index)
		{
			case 0:
				color = new Color3f(Color.BLUE);
				app.setMaterial(new Material(color, black, color, black, 1.0f));
				break;
			case 1:
				color = new Color3f(Color.RED);
				app.setMaterial(new Material(color, black, color, black, 1.0f));
				break;
			case 2:
				color = new Color3f(Color.GREEN);
				app.setMaterial(new Material(color, black, color, black, 1.0f));
				break;
			case 3:
				color = new Color3f(Color.MAGENTA);
				app.setMaterial(new Material(color, black, color, black, 1.0f));
				break;
			case 4:
				color = new Color3f(Color.ORANGE);
				app.setMaterial(new Material(color, black, color, black, 1.0f));
				break;
		}
			
	}
}

